ru.CryptoPro.JCPxml.dsig.internal.dom
Class DOMXMLSignature
java.lang.Object
ru.CryptoPro.JCPxml.dsig.internal.dom.DOMStructure
ru.CryptoPro.JCPxml.dsig.internal.dom.DOMXMLSignature
- All Implemented Interfaces:
- javax.xml.crypto.dsig.XMLSignature, javax.xml.crypto.XMLStructure
public final class DOMXMLSignature
- extends DOMStructure
- implements javax.xml.crypto.dsig.XMLSignature
DOM-based implementation of XMLSignature.
| Nested classes/interfaces inherited from interface javax.xml.crypto.dsig.XMLSignature |
javax.xml.crypto.dsig.XMLSignature.SignatureValue |
| Fields inherited from interface javax.xml.crypto.dsig.XMLSignature |
XMLNS |
|
Constructor Summary |
DOMXMLSignature(org.w3c.dom.Element sigElem,
javax.xml.crypto.XMLCryptoContext context,
java.security.Provider provider)
Creates a DOMXMLSignature from XML. |
DOMXMLSignature(javax.xml.crypto.dsig.SignedInfo si,
javax.xml.crypto.dsig.keyinfo.KeyInfo ki,
java.util.List<? extends javax.xml.crypto.dsig.XMLObject> objs,
java.lang.String id,
java.lang.String signatureValueId)
Creates a DOMXMLSignature from the specified components. |
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getId()
|
javax.xml.crypto.dsig.keyinfo.KeyInfo |
getKeyInfo()
|
javax.xml.crypto.KeySelectorResult |
getKeySelectorResult()
|
java.util.List |
getObjects()
|
javax.xml.crypto.dsig.XMLSignature.SignatureValue |
getSignatureValue()
|
javax.xml.crypto.dsig.SignedInfo |
getSignedInfo()
|
void |
marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
java.lang.String dsPrefix,
javax.xml.crypto.dom.DOMCryptoContext context)
|
void |
marshal(org.w3c.dom.Node parent,
java.lang.String dsPrefix,
javax.xml.crypto.dom.DOMCryptoContext context)
|
void |
sign(javax.xml.crypto.dsig.XMLSignContext signContext)
|
boolean |
validate(javax.xml.crypto.dsig.XMLValidateContext vc)
|
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.xml.crypto.XMLStructure |
isFeatureSupported |
DOMXMLSignature
public DOMXMLSignature(javax.xml.crypto.dsig.SignedInfo si,
javax.xml.crypto.dsig.keyinfo.KeyInfo ki,
java.util.List<? extends javax.xml.crypto.dsig.XMLObject> objs,
java.lang.String id,
java.lang.String signatureValueId)
- Creates a
DOMXMLSignature from the specified components.
- Parameters:
si - the SignedInfoki - the KeyInfo, or null if not specifiedobjs - a list of XMLObjects or null
if not specified. The list is copied to protect against subsequent
modification.id - an optional id (specify null to omit)signatureValueId - an optional id (specify null to
omit)
- Throws:
java.lang.NullPointerException - if si is null
DOMXMLSignature
public DOMXMLSignature(org.w3c.dom.Element sigElem,
javax.xml.crypto.XMLCryptoContext context,
java.security.Provider provider)
throws javax.xml.crypto.MarshalException
- Creates a
DOMXMLSignature from XML.
- Parameters:
sigElem - Signature element
- Throws:
javax.xml.crypto.MarshalException - if XMLSignature cannot be unmarshalled
getId
public java.lang.String getId()
- Specified by:
getId in interface javax.xml.crypto.dsig.XMLSignature
getKeyInfo
public javax.xml.crypto.dsig.keyinfo.KeyInfo getKeyInfo()
- Specified by:
getKeyInfo in interface javax.xml.crypto.dsig.XMLSignature
getSignedInfo
public javax.xml.crypto.dsig.SignedInfo getSignedInfo()
- Specified by:
getSignedInfo in interface javax.xml.crypto.dsig.XMLSignature
getObjects
public java.util.List getObjects()
- Specified by:
getObjects in interface javax.xml.crypto.dsig.XMLSignature
getSignatureValue
public javax.xml.crypto.dsig.XMLSignature.SignatureValue getSignatureValue()
- Specified by:
getSignatureValue in interface javax.xml.crypto.dsig.XMLSignature
getKeySelectorResult
public javax.xml.crypto.KeySelectorResult getKeySelectorResult()
- Specified by:
getKeySelectorResult in interface javax.xml.crypto.dsig.XMLSignature
marshal
public void marshal(org.w3c.dom.Node parent,
java.lang.String dsPrefix,
javax.xml.crypto.dom.DOMCryptoContext context)
throws javax.xml.crypto.MarshalException
- Specified by:
marshal in class DOMStructure
- Throws:
javax.xml.crypto.MarshalException
marshal
public void marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
java.lang.String dsPrefix,
javax.xml.crypto.dom.DOMCryptoContext context)
throws javax.xml.crypto.MarshalException
- Throws:
javax.xml.crypto.MarshalException
validate
public boolean validate(javax.xml.crypto.dsig.XMLValidateContext vc)
throws javax.xml.crypto.dsig.XMLSignatureException
- Specified by:
validate in interface javax.xml.crypto.dsig.XMLSignature
- Throws:
javax.xml.crypto.dsig.XMLSignatureException
sign
public void sign(javax.xml.crypto.dsig.XMLSignContext signContext)
throws javax.xml.crypto.MarshalException,
javax.xml.crypto.dsig.XMLSignatureException
- Specified by:
sign in interface javax.xml.crypto.dsig.XMLSignature
- Throws:
javax.xml.crypto.MarshalException
javax.xml.crypto.dsig.XMLSignatureException
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object